Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
alcalzone-shared
Advanced tools
A set of utilities shared between my projects
Function documentation available here
isArray
and isObject
to use an extensive conditional type to replace what used to work in TS 4.7Undo changes to isObject
from 4.0.6
. TS narrowing in 4.8.2 is broken.
isObject
{}
argumentsisArray
is inferred correctly for readonly
arraysisArray
to be compatible with TS 4.8 changesSortedQueue
: Fixed an issue where inserting an item before the first one would cause the queue to lose track of items
wait()
with Electron if unref
is true
resolve
of DeferredPromise
is no longer optional, except for Promise<void>
isObject
no longer narrows the type of the argument to object
DropLast
-> Lead
TakeLast
-> Last
TakeLastArgument
-> LastArgument
FixedIndizesOf<T[]>
- Like IndizesOf
, but does not include the type number
if the tuple/array is variable-lengthTail<T[]>
- Returns all but the first item's type in a tuple/arrayPush<List[], Item>
- Returns the given tuple/array with the item type appended to itConcat<T1[], T2[]>
- Concatenates the given tuples/arraysTupleOf<T, N>
- Returns a tuple of length N
with item types T
.Range<N>
- Creates a Union of all numbers (converted to string) from 0 to N (exclusive), e.g. Range<4>
is equal to "0" | "1" | "2" | "3"
.RangeFrom<N, M>
- Creates a Union of all numbers from N (inclusive) to M (exclusive), e.g. RangeFrom<2, 4>
is equal to "2" | "3"
.IsGreaterThan<N, M>
- is equal to true
if N > M
, otherwise false
IsLessThanOrEqual<N, M>
- is equal to true
if N <= M
, otherwise false
IsLessThan<N, M>
- is equal to true
if N < M
, otherwise false
IsGreaterThanOrEqual<N, M>
- is equal to true
if N >= M
, otherwise false
CallbackAPIReturnType
now works with strictNullChecks
.Promisify
is no longer experimental and no longer messes up the inferred signature argument namesunref
parameter to async
-> wait(ms, [unref])
FAQs
A set of utilities shared between my projects
The npm package alcalzone-shared receives a total of 13,434 weekly downloads. As such, alcalzone-shared popularity was classified as popular.
We found that alcalzone-shared demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.